"use client"; /** * /f/[slug] — PUBLIC form submission page (no auth; middleware whitelists /f/). * * Loads the PUBLISHED form by slug (GET /public/forms/:slug, no auth) and * renders it with the shared , which validates + submits * (POST /public/forms/:slug/submit). Only PUBLISHED forms resolve — * draft/closed/unknown slugs 404 on the API and render the "not available" * state (closed forms render their closed state instead). * * Standalone (no (app) shell): this is a top-level public route, so it carries * its own minimal page chrome. */ import { useParams } from "next/navigation"; import { FormRenderer } from "@/components/form/form-renderer"; export default function PublicFormPage() { const params = useParams<{ slug: string }>(); const slug = params?.slug ?? ""; return (
{slug ? ( ) : (

Missing form slug.

)}
); }